module.exports = [
  {
    path: '/auth',
    component: '../layouts/AuthLayout',
    routes: [
      { path: '/auth', redirect: '/auth/login' },
      { path: '/auth/login', name: '登录', component: './auth/Login' },
    ],
  },
  {
    path: '/',
    component: '../layouts/SecurityLayout',
    routes: [
      {
        path: '/',
        component: '../layouts/BasicLayout',
        Routes: ['src/pages/Authorized'],
        authority: ['admin', 'user'],
        routes: [
          { path: '/', name: '欢迎页', component: './Welcome' },
          {
            path: '/user',
            name: '用户管理',
            routes: [
              { path: '/user', redirect: '/user/userList' },
              { path: '/user/userList', name: '用户列表', component: './user/UserList' },
            ]
          },
          {
            path: '/privilege',
            name: '权限管理',
            routes: [
              { path: '/privilege', redirect: '/privilege/adminList' },
              { path: '/privilege/adminList', name: '管理员', component: './admin/AdminList' },
              { path: '/privilege/roleList', name: '角色列表', component: './admin/RoleList' },
              { path: '/privilege/menuList', name: '菜单列表', component: './admin/MenuList' },
            ]
          },
          {
            path: '/system',
            name: '系统管理',
            routes: [
              { path: '/system', redirect: '/system/exchange' },
              { path: '/system/baseConfig', name: '基本配置', component: './system/BaseConfig' },
            ]
          },
          {
            component: './404',
          },
        ],
      },
    ],
  },
  {
    component: './404',
  },
];
